package net.zdsoft.wpchat.android.client;

import net.zdsoft.keel.util.Pagination;

/**
 * 用于分页显示的 Action 基类
 * 
 * @author xuan
 * @version $Revision: 1.0 $, $Date: 2014-9-22 下午10:33:39 $
 */
public class PageAction extends BasicAction {
    private static final long serialVersionUID = 3812369783568446515L;

    private static final int DEFAULT_PAGE_SIZE = 10;

    private Pagination page = null;

    public PageAction() {
        // 默认不使用游标
        page = new Pagination(DEFAULT_PAGE_SIZE, false);
    }

    public Pagination getPage() {
        return page;
    }

    public void setPageIndex(int pageIndex) {
        page.setPageIndex(pageIndex);
    }

    public int getPageIndex() {
        return page.getPageIndex();
    }

    public void setPageSize(int pageSize) {
        page.setPageSize(pageSize);
    }

    public void setUseCursor(boolean isUseCursor) {
        page.setUseCursor(isUseCursor);
    }

}
